Average value (0BA7 only)

Short description

The average value function samples the analog input signal during configured time period and outputs the average value at AQ.

Connetion

Description

Input En

A positive edge (0 to 1 transition) at input En (Enable) sets the output AQ to the average value of input Ax after the configured time. A negative edge (1 to 0 transition) holds the output at its last calculated value.

Input R

A positive edge (0 to 1 transition) at input R (Reset) resets the output AQ to 0.

Input Ax

Input Ax is one of the following analog signals:

  • AI1 to AI8 (*)

  • AM1 to AM16

  • AN1 to AN32

  • AQ1 and AQ2

  • SAQ1 to SAQ16

  • The block number of a function with analog output

Parameter

St (Sampling time): You can set it to Seconds, Days, Hours or Minutes.

Range of values:

If St = Seconds: 1 to 59

If St = Days: 1 to 365

If St = Hours: 1 to 23

If St = Minutes: 1 to 59

Sn (Number of samples):

Range of values:

If St = Seconds: 1 to St*100

If St = Days: 1 to 32767

If St = Hours: 1 to 32767

If St = Minutes and St ≤ 5 minutes: 1 to St*6000

If St = Minutes and St ≥ 6 minutes: 1 to 32767

Output AQ

AQ outputs the average value over the specified time of sampling.

* AI1 to AI8: 0 to 10 V corresponds with 0 to 1000 (internal value).

Parameter St and Sn

Parameter St represents the sampling time and parameter Sn represents the number of samples.

Timing diagram

Description of the function

When En = 1, the average value function calculates the average value of the samples during the configured time interval. At the end of the sampling time, this function sets output AQ to this calculated average value.

When En = 0, the calculation stops, and AQ retains the last calculated value. When R = 0, AQ is reset to 0.

Special Functions Overview